<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:insert="~{fragment/header :: header}"></th:block>
    <meta charset="UTF-8">
    <title>Home</title>
    <link rel="stylesheet" href="/editor/css/editormd.min.css">
    <script src="/editor/lib/marked.min.js"></script>
    <script src="/editor/lib/raphael.min.js"></script>
    <script src="/editor/lib/underscore.min.js"></script>
    <script src="/editor/lib/sequence-diagram.min.js"></script>
    <script src="/editor/lib/flowchart.min.js"></script>
    <script src="/editor/lib/jquery.flowchart.min.js"></script>
    <script src="/editor/lib/underscore.min.js"></script>
    <script src="/editor/editormd.min.js"></script>
    <link rel="stylesheet" href="/js/prettify/skins/sunburst.css">
</head>
<body>
<main class="ui fluid container">
    <div class="ui segment">
        <div class="ui three column grid">
            <div class="column text container center aligned">
                <a href="/problems"><i class="ui blue link cloud icon massive"></i>
                    <h3>刷题</h3></a></div>
            <div class="column text container center aligned">
                <a href="/contest"><i
                        class="ui orange link lightbulb outline icon massive"></i>
                    <h3>比赛</h3></a></div>
            <div class="column text container center aligned">
                <a href="/">
                    <i class="ui link massive book red icon"></i>
                    <h3>学习</h3></a></div>
        </div>
    </div>
    <div class="ui divider"></div>
        <div class="ui segment">
            <h1 class="ui header center aligned">公告</h1>
            <div id="editormd-view">
                <textarea style="display: none"></textarea>
            </div>
    </div>
</main>
<script>
    $.get("/notice", function (data, status) {
        editormd.markdownToHTML("editormd-view", {
            markdown: data,
            gfm: true,
            toc: true,
            tocm: false,
            tocStartLevel: 1,
            tocTitle: "目录",
            htmlDecode: "style,script,iframe|on*",
            tocDropdown: false,
            tocContainer: "",
            emoji: true,
            autoLoadKaTeX: true,
            pageBreak: true,
            atLink: true,    // for @link
            emailLink: true,    // for mail address auto link
            tex: true,
            taskList: false,   // Github Flavored Markdown task lists
            flowChart: true,
            sequenceDiagram: true,
            previewCodeHighlight: true,
            lineNumbers: false,
        });
    });
</script>
<footer th:replace="~{fragment/footer :: footer}"></footer>
</body>
</html>